<?php

use yii\db\Migration;
use yii\db\Schema;

class m170123_103602_ADD_COLUMN_TEMPLATE_2 extends Migration
{
    public function up()
    {
         $this->addColumn('{{template}}', 'signup', Schema::TYPE_TEXT. " NULL COMMENT '报名须知' ");
         $this->addColumn('{{product}}', 'signup', Schema::TYPE_TEXT. " NULL COMMENT '报名须知' ");


         $this->addColumn('{{template}}', 'land', Schema::TYPE_TEXT. " NULL COMMENT '岸上游' ");
         $this->addColumn('{{product}}', 'land', Schema::TYPE_TEXT. " NULL COMMENT '岸上游' ");

         $this->addColumn('{{template}}', 'expense', Schema::TYPE_TEXT. " NULL COMMENT '自费项目' ");
         $this->addColumn('{{product}}', 'expense', Schema::TYPE_TEXT. " NULL COMMENT '自费项目' ");
         
         $this->addColumn('{{template}}', 'type', Schema::TYPE_INTEGER. "(1) DEFAULT  '1' COMMENT '1 母港 2 海外' ");
         $this->addColumn('{{product}}' , 'type', Schema::TYPE_INTEGER. "(1) DEFAULT  '1' COMMENT '1 母港 2 海外' ");
    }

    public function down()
    {
        echo "m170123_103602_ADD_COLUMN_TEMPLATE_2 cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
